<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
    </head>
    <body>
        <h1 id="a">广东</h1>
        <button id="b">开始</button>
        <button id="c">结束</button>

        <script>
            var a=document.getElementById('a')
            var b=document.getElementById('b')
            var c=document.getElementById('c')
            var user=['广东','广西','北京','江西','上海','台湾','湖南','湖北','河南','河北','西藏'];
            var timer;
            b.onclick=function(){
                clearInterval(timer)
                timer=setInterval(function(){
                    var n=parseInt(Math.random()*user.length);
                    a.innerHTML=user[n];
                },100)
            }
            c.onclick=function(){
                clearInterval(timer)
            }
        </script>
    </body>
</html>